<{include file="header.html"}>
<script type="text/javascript">
function getContent()
{
	var name = document.getElementById('name');
	var str = "";
	if (name.value) {
		str = "name=" + name.value.replace("&", "%26");
	}
	
	document.form_filter.action = "<{$smarty.const.APPLICATION_URL}>/country/list/?" + str;

	document.form_filter.submit();
}
function clickshowterm(id) {
   var e = document.getElementById('contentterm_'+id);
   if(e.style.display == '')
      e.style.display = 'none';
   else
      e.style.display = '';
}
</script>
	<div class="one_third">
		<div class="box_tool">
			<div class="box_head"><{$smarty.const._LB_TOOLBOX|utf8_escape_html}></div>

			<div class="box_content">
                <{$smarty.const._LB_CURRENT_GLOBAL_TC_VERSION|utf8_escape_html}>: <span style="color: #FF0000"><b><{if $current_tc_version}><{$current_tc_version|utf8_escape_html}><{else}>0<{/if}></b></span><br/>
				<a id="auto_country_add" href="<{$smarty.const.APPLICATION_URL}>/country/form/?act=<{$smarty.const.ACT_EDIT}>">
					<{$smarty.const._LB_ADD_COUNTRY|utf8_escape_html}>
				</a><br/>
                <a id="auto_tc_version_modified" href="<{$smarty.const.APPLICATION_URL}>/global_tc_version/update/">
					<{$smarty.const._LB_UPDATE_TC_VERSION|utf8_escape_html}>
				</a>
			</div>
		</div>
		<div class="spacer"></div>
		<div class="box_tool">
			<div class="box_head"><{$smarty.const._LB_FILTER|utf8_escape_html}></div>
			<div class="box_content" id="filter_panel">
				<table>
				<form name='form_filter' method="post" action="">
				<tr>
					<td width="40%"><{$smarty.const._LB_COUNTRY_NAME|utf8_escape_html}>&nbsp;:&nbsp;</td>
					<td width="60%">
						<input type="text" name="name" id="name" value="<{$filter.name|utf8_escape_html}>" style="width: 180px;"/>
					</td>
				</tr>
				<tr>
					<td class="submit" colspan="2" style="padding-top:10px;">
						<a id="auto_country_search" class="tribullet" style="float:right" id="obj_search" href="#" onclick="getContent();"><{$smarty.const._LB_SEARCH}></a>
					</td>
				</tr>
				</form>
				</table>
			</div>
		</div>
	</div>

	<div class="two_third" style="height:1%">
		<div class="box_two_third">
			<div class="box_head"><{$smarty.const._LB_COUNTRY|utf8_escape_html}></div>
			<div class="box_content">
			<{if $country->N}>
					<{while $country->fetch()}>
					<div class="object" robotid="<{$country->ID}>">
						<div class="head">
							<div class="right remove_top">
                                <a  id="auto_country_tc_<{$country->ID}>">
									<img onclick="clickshowterm('<{$country->ID}>')" id ="viewtermcondition" src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_ZOOM_IN_SMALL}>" title="<{$smarty.const._LB_COUNTRY_TERM_CONDITION|utf8_escape_html}>" alt="<{$smarty.const._LB_COUNTRY_TERM_CONDITION|utf8_escape_html}>"/>
								</a>
                                <a id="auto_country_detail_<{$country->ID}>" href="<{$smarty.const.APPLICATION_URL}>/country/detail/?id=<{$country->ID}>">
									<img src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_DETAIL}>" title="<{$smarty.const._LB_DETAIL|utf8_escape_html}>" alt="<{$smarty.const._LB_DETAIL|utf8_escape_html}>"/>
								</a>
								<a id="auto_country_edit_<{$country->ID}>" href="<{$smarty.const.APPLICATION_URL}>/country/form?id=<{$country->ID}>">
									<img src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_EDIT_SMALL}>" title="<{$smarty.const._LB_EDIT|utf8_escape_html}>" alt="<{$smarty.const._LB_EDIT|utf8_escape_html}>"/>
								</a>
								<{if $country->isDeleteAble($country->ID)}>
									<a id="auto_country_delete_<{$country->ID}>" onclick="return confirm('<{$smarty.const._MSG_CONFIRM_COUNTRY_DELETION|utf8_escape_jshtml}>');" href="<{$smarty.const.APPLICATION_URL}>/country/form/?act=<{$smarty.const.ACT_DELETE}>&amp;id=<{$country->ID}>">
										<img src="<{$smarty.const.APPLICATION_URL}>/images/<{$smarty.const.IMAGE_NAME_DELETE_SMALL}>" title="<{$smarty.const._LB_DELETE|utf8_escape_html}>" alt="<{$smarty.const._LB_DELETE|utf8_escape_html}>"/>
									</a>
							  	<{else}>
									<img id="auto_country_delete_<{$country->ID}>" class="small" src="<{$smarty.const.APPLICATION_URL}>/images/delete_not_small.png"/>
								<{/if}>
							</div>
							<{$country->NAME|i18n|utf8_escape_html}> (<{$country->CODE|utf8_escape_html}>)
						</div>
						<div class="content">
							<table border="0" cellpadding="3" cellspacing="0">
							   <{* <tr>
									<td width="30%"><{$smarty.const._LB_STATUS|utf8_escape_html}>&nbsp;:&nbsp;</td>
									<td>
										<{if $country->DISABLED == '1'}>
										    <span style="color:#f00;"><{$smarty.const._LB_STATUS_DISABLE|utf8_escape_html}></span>
										<{else}>
										    <{$smarty.const._LB_STATUS_ENABLE|utf8_escape_html}>
										<{/if}>
									</td>
								</tr>*}>
                                <tr>
									<td width="30%"><{$smarty.const._LB_MAIN_CITY|utf8_escape_html}>&nbsp;:&nbsp;</td>
									<td>
										<{$country->CITY_NAME|i18n|utf8_escape_html}>
									</td>
								</tr>
                                <{if $country->LAT}>
								<tr>
									<td width="30%"><{$smarty.const._LB_COUNTRY_LAT|utf8_escape_html}>&nbsp;:&nbsp;</td>
									<td>
										<{$country->LAT|utf8_escape_html}>
									</td>
								</tr>
                                <{/if}>
                                <{if $country->LON}>
								<tr>
									<td width="30%" ><{$smarty.const._LB_COUNTRY_LON|utf8_escape_html}>&nbsp;:&nbsp;</td>
									<td>
										<{$country->LON|utf8_escape_html}>
									</td>
								</tr>
                                <{/if}>
                                <tr>
						            <td><{$smarty.const._LB_COUNTRY_LANGUAGE_CODE|utf8_escape_html}>&nbsp;:&nbsp;</td>
						            <td>
							            <{$country->LANGUAGE_CODE|utf8_escape_html}>
						            </td>
					            </tr>
                                <tr id ="contentterm_<{$country->ID}>" style="display:none">
						            <td><{$smarty.const._LB_COUNTRY_TERM_CONDITION|utf8_escape_html}>&nbsp;:&nbsp;</td>
						            <td>
							            <{$country->TERM_CONDITION|i18n|utf8_escape_html}>
						            </td>                                    
					            </tr>
							</table>
						</div>
					</div>
					<{/while}>
			<{else}>
				<p><{$smarty.const._MSG_NO_EXISTING_COUNTRY|utf8_escape_html}></p>
			<{/if}>
			</div>
		</div>
		<{if $pager->pg_object->_totalPages > 1}>
			<div class="center" style="padding-top:5px;">
				<div class="pagination"><{$pager->display()}></div>
			</div>
		<{/if}>
	</div>
<{include file="footer.html"}>
